import request from "@/utils/request";
let name = "resource";
export const getList = (params) => {
  return request({
    url: `/yybl/${name}/list`,
    params: params,
    method: "get",
  });
};
export const addList = (params) => {
  return request({
    url: `/yybl/${name}/add`,
    params: params,
    method: "post",
  });
};
export const editList = (params) => {
  return request({
    url: `/yybl/${name}/update`,
    params: params,
    method: "post",
  });
};
export const updateKey = (params) => {
  return request({
    url: `/system/${device}/updateKey`,
    // headers: { 'content-type': 'application/x-www-form-urlencoded' },
    data: params,
    method: "post",
  });
};
export const delCurRow = (params) => {
  return request({
    url: `/yybl/${name}/delete`,
    params: params,
    method: "post",
  });
};
// export const importData = (params) => {
//   return request({
//     url: `/system/${device}/importData`,
//     params: params,
//     method: "post",
//   });
// };
// export const dataExport = (params) => {
//   return request({
//     url: `/system/${device}/export`,
//     params: params,
//     method: "post",
//   });
// };
// export const computerList = (params) => {
//   return request({
//     url: `/system/computer/list`,
//     params: params,
//     method: "get",
//   });
// };
// export const asyc = (params) => {
//   return request({
//     url: `/system/${device}/sync`,
//     params: params,
//     method: "post",
//   });
// };

export const queryAreaList = (params) => {
  return request({
    url: `/system/edgeDevice/queryAreaList`,
    params: params,
    method: "get",
  });
};
export const updateStatus = (params) => {
  return request({
    url: `/system/edgeDevice/isEnable`,
    // headers: { 'content-type': 'application/x-www-form-urlencoded' },
    data: params,
    method: "post",
  });
};
